package com.aos.erp.gov.ex.web.rest;

import com.aos.erp.common.bean.PageBean;
import com.aos.erp.common.bean.ResultEntity;
import com.aos.erp.gov.ex.model.GovExSyncTask;
import com.aos.erp.gov.ex.service.GovExSyncTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController("SchoolSyncTaskController")
@RequestMapping("/api/task")
@Api("SchoolSyncTaskController")
public class GovExSyncTaskController {

    @Resource
    private GovExSyncTaskService schoolSyncTaskService;

    @GetMapping("/list")
    @ApiOperation(value = "分页查询")
    public ResultEntity<PageBean<GovExSyncTask>> queryPageBean(@RequestParam(name = "pageIndex", required = false, defaultValue = "1") int pageIndex
            , @RequestParam(name = "pageSize", required = false, defaultValue = "20") int pageSize) {
        return ResultEntity.success(schoolSyncTaskService.queryByPage(pageIndex, pageSize));
    }

}